package ltd.hxya.novel.book.config;

import org.springframework.boot.actuate.health.AbstractHealthIndicator;
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.Status;
import org.springframework.context.annotation.Configuration;

@Configuration
public class HealthConfig extends AbstractHealthIndicator {


    //自定义health端点
    @Override
    protected void doHealthCheck(Health.Builder builder) throws Exception {
        builder.withDetail("es","正常");
        builder.status(Status.UP);
    }
}
